<%@ taglib prefix="c"   uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@page import = "com.db4o.servlet.Db4oServlet" %>
<%@page import = "facades.*" %>
<%@page import = "auser.*" %>
<%@page import = "com.db4o.query.*" %>
<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet"  href="<%=request.getContextPath()%>/css/printpreview.css" type="text/css" media="screen" />
<link rel="stylesheet"  href="<%=request.getContextPath()%>/css/print.css" type="text/css" media="print" />
<script src="<%=request.getContextPath()%>/js/jquery.js"></script>
<title>Stampa Elenco Mezzi di Accompagnamento</title>

</head>
<body>
<% SessionFacade sfacade = new SessionFacade(session); %> 
		
<% Query qu = sfacade.newQuery(MezziAccompagnato.class); %>
<% Utente utente = (Utente)session.getAttribute("userBean"); %>	
<% qu.descend("circolo").constrain(utente.getCircolo());  %> 
<% qu.descend("descrizione").orderAscending() ;  %>	
	
<table>
	<thead> 
		<tr class='noprint'><th colspan="3">
				<a href='<%=request.getContextPath() %>/app/start/index.jsp'>Chiudi</a> 
				|<a href='javascript:print()'>Stampa</a> 
		<tr><th colspan="3"><div class="logo">Mezzi di Accompagnamento -  ${userBean.circolo.descrizione} </div>	
		
		<tr><th>Tipo Mezzo
			<th style="width:8cm">Descrizione
			<th style="text-align:right">Rimborso km	  
	</thead>  
	<tbody>
		<c:forEach items="<%=qu.execute()%>" var="obj" varStatus="status">
			 
			<tr style="vertical-align:top">
				<td>${obj.tipo}   &nbsp;&nbsp; 
				<td>${obj.descrizione}   &nbsp;&nbsp; 
				<td align="right">€ <fmt:formatNumber pattern="0.00" value="${obj.rimborsoKm}"  />   &nbsp;&nbsp; 
	  
		</c:forEach> 
	</tbody>	
</table>	
</body>	
</html>